﻿CREATE TRIGGER CustomerLoans_Tracking_Delete
ON [dbo].[CustomerLoans] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.CustomerLoans_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.CustomerLoans_Tracking s JOIN DELETED i
    ON s.LoanID = i.LoanID
END














